<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 50px;
            background-color: #f5f5f5;
        }
        .container {
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            max-width: 600px;
            margin: 0 auto;
        }
        .success {
            color: #28a745;
            font-size: 24px;
            margin-bottom: 20px;
        }
        .info {
            background: #e7f3ff;
            padding: 15px;
            border-radius: 5px;
            margin: 10px 0;
        }
        .link {
            display: inline-block;
            background: #007bff;
            color: white;
            padding: 10px 20px;
            text-decoration: none;
            border-radius: 5px;
            margin: 5px;
        }
        .link:hover {
            background: #0056b3;
            color: white;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="success">✅ 项目运行正常！</h1>
        
        <div class="info">
            <h3>系统信息</h3>
            <p><strong>当前时间：</strong><%= new java.util.Date() %></p>
            <p><strong>项目路径：</strong><%= request.getContextPath() %></p>
            <p><strong>服务器信息：</strong><%= application.getServerInfo() %></p>
            <p><strong>Java版本：</strong><%= System.getProperty("java.version") %></p>
        </div>
        
        <div class="info">
            <h3>快速导航</h3>
            <a href="<%= request.getContextPath() %>/movies" class="link">电影列表</a>
            <a href="<%= request.getContextPath() %>/login" class="link">用户登录</a>
            <a href="<%= request.getContextPath() %>/register" class="link">用户注册</a>
            <a href="<%= request.getContextPath() %>/admin/" class="link">管理员后台</a>
        </div>
        
        <div class="info">
            <h3>测试链接</h3>
            <p>如果您能看到这个页面，说明项目已经成功部署并运行。</p>
            <p>请尝试访问以下链接测试各个功能：</p>
            <ul>
                <li><a href="<%= request.getContextPath() %>/movies">电影列表页面</a></li>
                <li><a href="<%= request.getContextPath() %>/admin/movies">管理员电影管理</a>（需要登录）</li>
                <li><a href="<%= request.getContextPath() %>/admin/showtimes">管理员场次管理</a>（需要登录）</li>
            </ul>
        </div>
        
        <div class="info">
            <h3>常见访问地址</h3>
            <p>根据您的部署情况，请尝试以下地址：</p>
            <ul>
                <li><code>http://localhost:9090/cinema_booking_system_war/</code></li>
                <li><code>http://localhost:9090/cinema_booking_system_war/movies</code></li>
                <li><code>http://localhost:9090/cinema_booking_system_war/test.jsp</code></li>
            </ul>
        </div>
    </div>
</body>
</html>
